import re

str_test = "202409 Hello Python 0759"

# 使用正则表达式去掉两侧的数字和空格
result = re.sub(r'^[0-9\s]+|[0-9\s]+$', '', str_test)

print(result)
